package com.zzy.cglib.bean;

import java.util.Date;

import com.zzy.cglib.bean.model.Person;
import com.zzy.cglib.bean.model.User;

import net.sf.cglib.beans.BeanCopier;

public class MainTest {
    static  BeanCopier bc = BeanCopier.create(Person.class, User.class,true);

	public static void main(String[] args) {
		
       
                
                
                Person person=new Person();
                person.setName("张三");
                
                User  user=new 	User();
                user.setDate(new Date());
                user.setPsw("1111");
                
                
                
              //  BigIntConverter  convert=new BigIntConverter();
                
                bc.copy(person,user , null);
               
                System.out.println(user.getName());
                System.out.println(user.getDate());
                System.out.println(user.getPsw());
                
                /**
                 * 发现copy不保留原来的属性.
                 */
        

	}

}
